def checkPrime(num):
    if num == 2:
        return True

    if num % 2 == 0:
        return False

    for x in range(3, num // 2 + 1):
        if num % x == 0:
            print(x)
            return False

    return True

def check_prime(num):
    if num == 2:
        return True

    if num % 2 == 0:
        return False

    for x in range(3, num // 2 + 1):
        if num % x == 0:
            print(x)
            return False

    return True

print(checkPrime(123))